package com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow;

import com.glsc.ngateway.common.base.domain.mysql.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;


/**
 * @author xuchang
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@Entity
@Where(clause = "deleted = 0")
@SQLDelete(sql = "update t_gw_flow_push_oa_log set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@SQLDeleteAll(sql = "update t_gw_flow_push_oa_log set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@Table(name = "t_gw_flow_push_oa_log")
@org.hibernate.annotations.Table(appliesTo = "t_gw_flow_push_oa_log")
public class FlowPushOaLog extends BaseEntity {

    @Column(name = "process_key")
    private String processKey;

    @Column(name = "task_key")
    private String taskKey;

    @Column(name = "process_id")
    private String processId;

    @Column(name = "task_id")
    private String taskId;

    @Column(name = "workflow_id")
    private String workflowId;

    @Column(name = "request_id")
    private String requestId;

    @Column(name = "creator")
    private String creator;

    @Column(name = "push_result")
    private String pushResult;
}
